<layout name="Index/layout" />
<div class="box-form form-edit">
    <div class="tit">
	    <ul class="float">
	        <li><a href="{:U('index')}" >文章列表</a></li>
	        <li><a href="{:U('add')}" class="current" >添加文章</a></li>
	    </ul> 
    </div>
    <div class="con form-edit">
        <form class="AjaxForm" data-action="{:U()}" method="post">
            <div class="span-right">
			<table class="bordered color">
			    <tr>
			        <th>
			            综合设置
			        </th>
			    </tr>
			    <tr>
			    	<td>缩略图</td>
			    </tr>
			    <tr>
			    	<td class="tc">
			    		{:W('Uploader/img',array('thumb','',array('thumb'=>1,'width'=>500,'height'=>300,'water'=>1)))}
			    	</td>
			    </tr>
			    <tr>
			    	<td>发布时间</td>
			    </tr>
			    <tr>
			    	<td class="tc">
			    		{:W('Datetime/dateTime',array('add_time',date('Y-m-d H:i:s')))}
			    	</td>
			    </tr>
				<tr>
					<td>阅读量</td>
				</tr>
				<tr>
					<td>
						<input type="text" name="view" size="10" value="{:mt_rand(10,100)}">
					</td>
				</tr>
				<tr>
					<td>排序</td>
				</tr>
				<tr>
					<td>
						<input type="text" name="sort" size="10" value="0">
					</td>
				</tr>
			</table>
            </div>

			<div class="span-left">
            <table class="bordered color">
			    <tr>
			        <th colspan="2">
			            添加文章
			        </th>
			    </tr>
				<tr>
					<td>栏目:</td>
					<td>
			            <select name="cid">
			            <foreach name="cate_tree" item="v">
			            	<option value="{$v.id}" <eq name="v.is_menu" value="1">disabled</eq> >{$v.mark}{$v.title}</option>
			            </foreach>
			            </select>
					</td>
				</tr>
				<tr>
					<td>标题:</td>
					<td>
						<input type="text" name="title" datatype="require" tip="标题(25个字至50个字节以内)">
					</td>
				</tr>
				<tr>
					<td width="10%">内容:</td>
					<td width="90%">
						{:W('Ueditor/editor',array('content'))}
					</td>
				</tr>
				<tr>
					<td>标签:</td>
					<td>
						{:W('Chosen/many',array('tag','',$tag))}
					</td>
				</tr>
				<tr>
					<td>关键词:</td>
					<td>
						<input type="text" name="keywords" tip="关键词(5个词左右,单个词8汉字以内),若留空自动截取文章的关键词.">
					</td>
				</tr>
				<tr>
					<td>描述:</td>
					<td>
						<textarea name="description" style="width:99%" tip="描述(字数80个汉字，160个字符以内),若留空自动截取文章的前160个字符."></textarea>
					</td>
				</tr>
                <tr>
                    <td class="td-2" colspan="2"><input type="submit" class="btn-big btn-blue" value="提交"></td>
                </tr>
            </table>
            </div>

        </form>
    </div>
</div>

<script type="text/javascript">
seajs.use(['ajax'],function(ajax){
    ajax.get();
    ajax.confirm();
    ajax.html();
    ajax.valid();
});
</script>